public class Mydate {
    public int year;
    public int month;
    public int day;

    public Mydate(int year){
        this(1999,9,9);
        this.year = year;
        System.out.println("一个参数的构造方法");
    }

    public Mydate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;

        System.out.println("三个参数的构造方法");
    }

    @Override
    public String toString() {
        return "Mydate{" +
                "year=" + year +
                ", month=" + month +
                ", day=" + day +
                '}';
    }
}
